FROM --platform=$TARGETPLATFORM node:16

ENV NODE_OPTIONS=--max_old_space_size=4092
WORKDIR /gva_web/
COPY package*.json .
RUN yarn
COPY . .

RUN yarn build 

FROM nginx:alpine
LABEL smartide="smartide"

COPY .docker-compose/nginx/conf.d/my.conf /etc/nginx/conf.d/my.conf
COPY --from=0 /gva_web/dist /usr/share/nginx/html
RUN cat /etc/nginx/nginx.conf
RUN cat /etc/nginx/conf.d/my.conf
RUN ls -al /usr/share/nginx/html
